package com.zhangyu;

import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        System.out.println("Starting OPC UA DATA Acquire.");
        System.out.println("If You Want to stop, please input 'stop' and then press Enter.");

        MyOpcUaClient myOpcUaClient = new MyOpcUaClient();
        myOpcUaClient.createClient();
        myOpcUaClient.connect();
        myOpcUaClient.startCollect();

        Scanner scanner = new Scanner(System.in);
        while (true) {
            String str = scanner.next();
            if(str.equals("stop")) {
                myOpcUaClient.stopCollect();
                break;
            }
        }

    }
}

